<div class="right_side_operate_area">
    <div class="right item_add_btn">
		<?php 
			$str_title=__("Add",true);
    		echo $html->link(__("Cancel",true).$str_title,"/groups/index/");
    	?>
	</div>
    <div class="clear"></div>
</div>
<?php
echo $form->create('Group', array('action' => 'add','id'=>'groupform','onsubmit'=>"return checkginfo()"));
?>
<div class="right_side_scollbar">
<div class="detail_info_panel">
<div class="details_item_line">
	<div class="details_item">
	    <div class="form_left_title left"><?php __("Group Name")?>：</div>
	    <div class="form_right_e_input left"><?php echo $form->text('Group.group_name');?></div>
	    <div id='groupnamemessage' style='display:none;' class="error_message">请输入部门名称</div>
	</div>
</div>
<div class="details_item_line">
	<div class="details_item">
	    <div class="form_left_title left">部门描述：</div>
	    <div class="form_right_e_input left"><?php echo $form->textarea('Group.remark',array('class' => 'form_textarea'));?></div>
	</div>
</div>
<?php 
$currentuser = $session->read('User');
echo $form->hidden('Group.owner',array('value' => $currentuser['id'])) ;
// echo $form->submit(__('Save',true), array("id"=>"addgroup","name"=>"submit","class"=>"buttom","div"=>false)); 
//echo $form->end('Save',true);
?>
<div class="details_item_line">
	<div class="details_item">
	    <div class="form_left_title left"></div>
		<div class="form_add_submit left">
	   		 <?php echo $form->submit(__('Save',true), array("id"=>"adduser","name"=>"submit","class"=>"buttom","div"=>false));  ?>
	    </div>
	</div>
</div>
</div>
</div>
<script>
function checkginfo(){
	  if($("#GroupGroupName").val().trim() == ''){
			$("#groupnamemessage").css('display','block');
			return false;
		  }else{
		 	 $("#groupnamemessage").css('display','none');
		  }
}
</script>